/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tema3;

import java.util.Scanner;

/**
 *
 * @author Alex
 */
public class factorial_de_un_numero {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    
        Scanner teclado = new Scanner (System.in);
        int suma=1;
        int num,i;  
        
        System.out.println("Ingrese un numero");
          num=teclado.nextInt();

              for(i=num;i>1;i--)
              {
              suma=suma*i;
               }
System.out.println("El factorial de "+num+" es "+suma);
       }
    }
